* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #ffffff;
}

.container {
    max-width: 900px;
    width: 100%;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 30px;
}

header h1 {
    font-size: 3em;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: 3px;
}

.game-wrapper {
    display: flex;
    gap: 30px;
    justify-content: center;
    flex-wrap: wrap;
}

.game-area {
    background: rgba(0, 0, 0, 0.3);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

#gameCanvas {
    background: #1a1a2e;
    border: 3px solid #16213e;
    border-radius: 5px;
    display: block;
}

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-width: 250px;
}

.info-panel {
    background: rgba(0, 0, 0, 0.3);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.info-panel h2 {
    margin-bottom: 15px;
    font-size: 1.5em;
    color: #f0f0f0;
}

.info-panel > div {
    margin: 10px 0;
    font-size: 1.1em;
    color: #e0e0e0;
}

.next-block {
    margin-top: 15px;
}

.next-block h3 {
    margin-bottom: 10px;
    font-size: 1.1em;
    color: #d0d0d0;
}

#nextCanvas {
    background: #0f3460;
    border: 2px solid #16213e;
    border-radius: 5px;
}

.controls {
    background: rgba(0, 0, 0, 0.3);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.controls h2 {
    margin-bottom: 15px;
    font-size: 1.5em;
    color: #f0f0f0;
}

.instructions {
    list-style: none;
    padding: 0;
}

.instructions li {
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.95em;
    color: #e0e0e0;
}

.instructions li:last-child {
    border-bottom: none;
}

.buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn {
    padding: 12px 24px;
    font-size: 1.1em;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.btn-secondary:active {
    transform: translateY(0);
}

footer {
    text-align: center;
    margin-top: 30px;
    opacity: 0.7;
    font-size: 0.9em;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .game-wrapper {
        flex-direction: column;
        align-items: center;
    }
    
    .sidebar {
        width: 100%;
        max-width: 300px;
    }
    
    #gameCanvas {
        width: 100%;
        max-width: 300px;
        height: auto;
    }
    
    header h1 {
        font-size: 2em;
    }
}

